Skip to content

Handle AI provider errors in WebSocket chat and clear loading state#41

Merged
rdehuyss merged 2 commits intojobrunr:mainfrom
arefbehboudi:fix/chat-websocket-ai-error-handling
Mar 30, 2026
Merged

Handle AI provider errors in WebSocket chat and clear loading state#41
rdehuyss merged 2 commits intojobrunr:mainfrom
arefbehboudi:fix/chat-websocket-ai-error-handling

Conversation

@arefbehboudi
Copy link
Copy Markdown
Contributor

This change improves WebSocket chat error handling when the AI provider request fails, so the socket is not closed by an uncaught exception and the chat UI does not remain stuck in a loading state.
What changed:

  • Added defensive error handling in ChatWebSocketHandler.java
  • Return an in-chat error bubble instead of failing silently
  • Added and updated tests for the new error-handling behavior in ChatWebSocketHandlerTest.java

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 27, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @arefbehboudi on file. In order for us to review and merge your code, please create a PR where you add yourself to the contributors of JobRunr. This only needs to be done once. As soon as that is done, we can review your PR.

Thanks a lot!

@arefbehboudi
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Mar 28, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 28, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Copy Markdown
Contributor

@rdehuyss rdehuyss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Thanks for your contribution!

@rdehuyss rdehuyss merged commit 5f5d6b3 into jobrunr:main Mar 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants